import fs from 'fs';

function writeJson(path: string, json: any) {
    try {
        fs.writeFileSync(path, JSON.stringify(json, null, 4));
        return true;
    } catch (e) {
        console.log('工具库 writeJson 写入 json 文件失败',e);
        return false;
    }
}

export default writeJson;